Skip to main content

FlowGptPrompt

Represents a GPT prompt step within a workflow, handling query execution and results.

Properties

NameDescription
KeyA unique identifier for the workflow step.
WorkflowCodeInstanceThe workflow code instance associated with the flow object.
CachedDMObjectsThe cached document management objects related to the flow object.
ExecutionTypeIndicates the execution type of the GPT query.
QueryIdSpecifies the unique identifier for the GPT query.
StructureDefines the structure of the GPT query return type.
QueryNameThe name of the GPT query to be executed.
TypeCodeThe type code associated with the flow object.
QueryParametersA list of parameters used for the GPT query execution.
ResumeOnErrorDetermines whether the query execution should continue when an error occurs.
ErrorOptionsDefines error-related options for the API step.
NameName for the workflow step.
ResultObjectNameSpecifies the object name to store the query results.
QueryResultHolds the result of the executed query.
CaptionThe caption dictionary representing localized captions for the flow object.

Constructors

NameDescription
FlowGptPrompt(name, workflowData, workflowCodeInstance)Constructor for the FlowGptPrompt class. Initializes a new instance of the FlowGptPrompt class.
FlowGptPrompt(name, workflowData, workflowCodeInstance)Initializes a new instance of the FlowGptPrompt class.
FlowGptPrompt(name,workflowData,workflowCodeInstance)Initializes a new instance of the FlowGptPrompt class with a name, workflow data, and workflow code instance.

Methods

NameDescription
ExecuteQueryAsync()Executes the GPT query asynchronously and stores the results.
Initialize()Initializes the FlowGptPrompt step with necessary configurations.
GetResult<T>()Executes the query and returns the result as an IEnumerable of type T, where T is the C# class representing the JSON structure returned by the query.
ToLiquid()Converts the query result to a Liquid-compatible format for template rendering.

Events

NameDescription
OnBeforeExecution(sender, args)Occurs before the execution of the workflow step.
OnAfterExecution(sender, args)Occurs after the execution of the workflow step.

Generic Types

NameDescription
TPropertiesGeneric type of properties.